using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;

namespace ShevaEngine.Core.Modules.Animations
{

    /// <summary>
    /// A structure that contains information for a bindpose skin offset.
    /// Represents the inverse bind pose for a bone.
    /// </summary>
    [ContentSerializerRuntimeTypeAttribute("ShevaEngine.Core.Modules.Animations.SkinInfo, ShevaEngine2")]    
    public struct SkinInfo
    {
        /// <summary>The name of the bone attached to the transform.</summary>
        public string BoneName;
        /// <summary>The transform for the bone.</summary>
        public Matrix InverseBindPoseTransform;
        /// <summary>The index in the MatrixPalette for the bone.</summary>
        public int PaletteIndex;
        /// <summary>The index of the bone.</summary>
        public int BoneIndex;

        /// <summary>
        /// Creates a new SkinInfo.
        /// </summary>
        /// <param name="name">The name of the bone attached to the transform.</param>
        /// <param name="inverseBindPoseTransform">The inverse bind pose transform for the bone.</param>
        /// <param name="paletteIndex">The index in the MatrixPalette for the bone.</param>
        /// <param name="boneIndex">The index of the bone.</param>
        public SkinInfo(string name, Matrix inverseBindPoseTransform,
            int paletteIndex, int boneIndex)
        {
            this.BoneName = name;
            this.InverseBindPoseTransform = inverseBindPoseTransform;
            this.PaletteIndex = paletteIndex;
            this.BoneIndex = boneIndex;
        }        
    }    
}